﻿using System;

namespace Affinity.Core.Utility
{
    public static class ExceptionUtil
    {
        public static Exception GetInnermostException(Exception ex)
        {
            Exception innermostException = ex;
            while (innermostException.InnerException != null) innermostException = innermostException.InnerException;
            return innermostException;
        }
    }
}
